import 'package:find_friend/pages/xspace/model/school_model.dart';

class HomeRecommdModel {
  String mobile;
  int schoolId;
  String nickname;
  String zodiac;
  String zodiacC;
  String wuxing;
  int res;
  List<String> label;
  String avatar;
  String schoolname;
  int gender;
  String bio;
  Voice signvoice;
  double offset;
  List<Photo> photowall;

  HomeRecommdModel(
      {this.mobile,
      this.schoolId,
      this.nickname,
      this.zodiac,
      this.zodiacC,
      this.wuxing,
      this.res,
      this.label,
      this.avatar,
      this.gender,
      this.bio,
      this.schoolname});

  HomeRecommdModel.fromJson(Map<String, dynamic> json) {
    mobile = json['mobile'];
    schoolId = json['school_id'];
    nickname = json['nickname'];
    zodiac = json['zodiac'];
    zodiacC = json['zodiac_c'];
    wuxing = json['wuxing'];
    res = json['res'];
    label = json["label"] == null ? null : json['label'].cast<String>();
    avatar = json['avatar'];
    gender = json["gender"];
    schoolname = json['schoolname'];
    bio = json["bio"];
    signvoice = json['signvoice'] != null ? new Voice.fromJson(json['signvoice']) : null;
    if (json['photowall'] != null) {
      photowall = new List<Photo>();
      json['photowall'].forEach((v) {
        photowall.add(new Photo.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['mobile'] = this.mobile;
    data['school_id'] = this.schoolId;
    data['nickname'] = this.nickname;
    data['zodiac'] = this.zodiac;
    data['zodiac_c'] = this.zodiacC;
    data['wuxing'] = this.wuxing;
    data['res'] = this.res;
    data['label'] = this.label;
    data['avatar'] = this.avatar;
    data['schoolname'] = this.schoolname;
    data['gender'] = this.gender;
    data['bio'] = this.bio;
    return data;
  }
}